<template>
    <div>
        <div><i class="el-icon-star-on"></i>基础信息</div>
        <r-list :ColsNum="5" :width="120" :ListCols="ListCols" ListType="Info" :ListData="ListData"></r-list>
    </div>
</template>
<script>
export default {
    data() {
        return {
            //基础信息
            ListCols: [
                [
                    {
                        label: '订单编号',
                        prop: 'orderNo',
                    },
                    {
                        label: '订单状态',
                        prop: 'state',
                        formatter: e => e.state == 26 ? '充值失败' : e.state == 27 ? '充值成功' : ''
                    },
                    {
                        label: 'IC卡号',
                        prop: 'cardNumber',
                    },
                    {
                        label: '充值方式',
                        prop: 'channel',
                        formatter: e => e.channel == 0 ? '充值失败' : e.channel == 1 ? '充值成功' : e.channel == 2 ? '系统充值' : ''
                    },
                    {
                        label: '支付方式',
                        prop: 'payType',
                        formatter: e => e.payType == 0 ? '未知' : e.payType == 1 ? '微信' : e.payType == 2 ? '支付宝' :e.payType == 3 ?'现金': ''
                    },
                    {
                        label: '充值金额',
                        prop: 'topupMoney',
                    },
                    {
                        label: '支付时间',
                        prop: 'topupTime',
                    },
                    {
                        label: '设备编号',
                        prop: 'equipmentNo',
                    },
                ]
            ],
            ListData: {
            }

        };
    },
    components: {},
    computed: {},
    mounted() {
        this.init()
    },
    methods: {
        async init() {
            let res = await this.api.icTopupinfo({
                id: this.$route.query.id
            })
            this.ListData = res.data
        },
        // showFrom() {
        //     this.$prompt(`请输入退款金额(支付金额:${this.ListData.payMoney})`, '提示', {
        //         confirmButtonText: '确定',
        //         cancelButtonText: '取消', cancelButtonClass: 'bg_danger',
        //         // inputPattern: /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/,
        //         // inputErrorMessage: '邮箱格式不正确'
        //     }).then(({ value }) => {
        //         this.$message({
        //             type: 'success',
        //             message: '退款成功'
        //         });
        //     }).catch(() => {
        //         this.$message({
        //             type: 'info',
        //             message: '取消输入'
        //         });
        //     });

        // }

    }
};
</script>
<style scoped lang='scss'>
</style>